use super::response::{Response, HttpState};
use super::request::{Request,HttpParam};
use async_std::fs::File;
pub struct Handler{
    data:String
}

impl Handler{
    pub fn new(resquest:String)->Self{
        Handler{
            data:resquest
        }
    }
    pub async fn get(&self)->String{    //对请求进行解析
        let mut response = String::from("HTTP/1.1 200 OK\r\n\
        Content-Type: text/html\r\n\
        \r\n");
        // let helper = Request::new(self.data.clone());
        // let router = helper.get(HttpParam::ROUTER).unwrap();
        // let data  = helper.get(HttpParam::DATA).unwrap();
        // println!("{:?}",router);  //路由
        // println!("{:?}",data);    //数据
        "".to_string()
        // let mut buf:Vec<u8> =Vec::new();
        // let mut picture_file = File::open("./web/clash.jpeg").await.unwrap();
        // picture_file.read_to_end(&mut buf).await.unwrap();
    }
}